<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增部门信息')" />
    <th:block th:include="include :: datetimepicker-css" />
    <!-- html模块 -->
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-sector-add">
            <!-- 新建所需信息 -->
            <div class="form-group">
                <label class="col-sm-3 control-label">部门名称：</label>
                <div class="col-sm-8">
                    <input name="sectorName" class="form-control" type="text">
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-3 control-label">创建人：</label>
                <div class="col-sm-8">
                    <input name="createBy" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">创建时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                        <input name="createTime" class="form-control" placeholder="yyyy-MM-dd" type="text" required>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">更新者：</label>
                <div class="col-sm-8">
                    <input name="updateBy" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">更新时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                        <input name="updateTime" class="form-control" placeholder="yyyy-MM-dd" type="text" required>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">状态：</label>
                <div class="col-sm-8">
                    <select name="state" class="form-control" th:with="type=${@dict.getType('sys_state_id')}">
                        <option value="">请选择</option>
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}"
                                th:value="${dict.dictValue}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">备注：</label>
                <div class="col-sm-8">
                    <textarea name="memo" class="form-control"></textarea>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />

    <!-- JS模块 -->
    <script type="text/javascript">
        var prefix = ctx + "vtsp/sector"
        $("#form-sector-add").validate(
            {
            focusCleanup: true
            });
        //提交新建的信息
        function submitHandler()
        {
            if ($.validate.form())
            {
                $.operate.save(prefix + "/add", $('#form-sector-add').serialize());
            }
        }
        //实现时间的选择
        $("input[name='createTime']").datetimepicker(
            {
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
            });

        $("input[name='updateTime']").datetimepicker(
            {
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
            });
    </script>
</body>
</html>